{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "1\n",
      "1\n"
     ]
    }
   ],
   "source": [
    "a = b = c = 1\n",
    "print a\n",
    "print b\n",
    "print c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5oyJZW50ZXLplK7pgIDlh7og5YW25LuW5Lu75oSP6ZSu5pi+56S644CC44CC44CC\n",
      "yes\n",
      "yes\n"
     ]
    }
   ],
   "source": [
    "var1 = 1\n",
    "var2 = 10\n",
    "'''\n",
    "这是注释\n",
    "'''\n",
    "a = raw_input(\"按enter键退出 其他任意键显示。。。\")\n",
    "print a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<type 'int'>\n",
      "<type 'str'>\n",
      "<type 'list'>\n",
      "<type 'tuple'>\n",
      "<type 'dict'>\n",
      "{'s2': 78, 's1': 4}\n",
      "['s2', 's1']\n",
      "[78, 4]\n",
      "4\n"
     ]
    }
   ],
   "source": [
    "print type(1)\n",
    "print type('abc')\n",
    "print type(['a','t',123])\n",
    "print type(('11',234))\n",
    "print type({'a':23,'b':67})\n",
    "dict1 = {'s1':4,'s2':78}\n",
    "print dict1\n",
    "print dict1.keys()\n",
    "print dict1.values()\n",
    "print dict1['s1']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['__doc__',\n",
       " '__name__',\n",
       " '__package__',\n",
       " 'acos',\n",
       " 'acosh',\n",
       " 'asin',\n",
       " 'asinh',\n",
       " 'atan',\n",
       " 'atan2',\n",
       " 'atanh',\n",
       " 'ceil',\n",
       " 'copysign',\n",
       " 'cos',\n",
       " 'cosh',\n",
       " 'degrees',\n",
       " 'e',\n",
       " 'erf',\n",
       " 'erfc',\n",
       " 'exp',\n",
       " 'expm1',\n",
       " 'fabs',\n",
       " 'factorial',\n",
       " 'floor',\n",
       " 'fmod',\n",
       " 'frexp',\n",
       " 'fsum',\n",
       " 'gamma',\n",
       " 'hypot',\n",
       " 'isinf',\n",
       " 'isnan',\n",
       " 'ldexp',\n",
       " 'lgamma',\n",
       " 'log',\n",
       " 'log10',\n",
       " 'log1p',\n",
       " 'modf',\n",
       " 'pi',\n",
       " 'pow',\n",
       " 'radians',\n",
       " 'sin',\n",
       " 'sinh',\n",
       " 'sqrt',\n",
       " 'tan',\n",
       " 'tanh',\n",
       " 'trunc']"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import math\n",
    "\n",
    "dir(math)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['__doc__',\n",
       " '__name__',\n",
       " '__package__',\n",
       " 'acos',\n",
       " 'acosh',\n",
       " 'asin',\n",
       " 'asinh',\n",
       " 'atan',\n",
       " 'atanh',\n",
       " 'cos',\n",
       " 'cosh',\n",
       " 'e',\n",
       " 'exp',\n",
       " 'isinf',\n",
       " 'isnan',\n",
       " 'log',\n",
       " 'log10',\n",
       " 'phase',\n",
       " 'pi',\n",
       " 'polar',\n",
       " 'rect',\n",
       " 'sin',\n",
       " 'sinh',\n",
       " 'sqrt',\n",
       " 'tan',\n",
       " 'tanh']"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import cmath\n",
    "\n",
    "dir(cmath)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(3+0j)\n"
     ]
    }
   ],
   "source": [
    "print cmath.sqrt(9)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.15"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
